import ProjectCardsList from '@entities/Projects/ui/ProjectCardsList/ProjectCardsList'
import { AddProjectForm } from '@features/AddProjectForm'
import { ProjectsFilterTabs } from '@features/ProjectFilterTabs/ui/ProjectFilterTabs'
import { UiActions } from '@shared/lib/store/UiSlice'
import { useDispatch } from 'react-redux'

export const ProjectsPageContent = () => {
  const dispatch = useDispatch()

  const addProject = () => {
    dispatch(UiActions.openPopup(<AddProjectForm />))
  }

  return (
    <>
      <ProjectsFilterTabs />
      <ProjectCardsList addProject={addProject} />
    </>
  )
}
